ECHO OFF
REM THIS A BATCH FILE TO DEBUG FORTRAN PROGRAM.
REM IT IS USED OF EDITTING,COMPILING,LINKING AND RUNNING FORTRAN PROGRAM.
:LOOP
REM  .FOR FILE EXIST?  AND HOW PRECESS?
CLS
ECHO %1.FOR
IF NOT EXIST %1.FOR GOTO FORSTOP1
IF EXIST %1.FOR EDLIN %1.FOR
IF EXIST %1.FOR GOTO BIANYI1
:BIANYI1END
IF %2.FOR==.FOR GOTO BIANYI3END
CLS
ECHO %2.FOR
IF NOT EXIST %2.FOR GOTO FORSTOP2
IF EXIST %2.FOR EDLIN %2.FOR
IF EXIST %2.FOR GOTO BIANYI2
:BIANYI2END
IF %3.FOR==.FOR GOTO BIANYI3END
CLS
ECHO %3.FOR
IF NOT EXIST %3.FOR GOTO FORSTOP3
IF EXIST %3.FOR EDLIN %3.FOR
IF EXIST %3.FOR GOTO BIANYI3
:BIANYI3END
REM LINK ,RUN
H6
LINK %1+%2+%3;
H2
%1
PAUSE
H3
GOTO LOOP





REM  COMPILING
:BIANYI1
H11
FOR1 %1.FOR;
PAS2
GOTO BIANYI1END
:BIANYI2
H12
FOR1 %2.FOR;
PAS2
GOTO BIANYI2END
:BIANYI3
H13
FOR1 %3.FOR;
PAS2
GOTO BIANYI3END





REM  HOW PRECESS WHEN NOT EXISTING
:FORSTOP2
H42
EDLIN %2.FOR
IF EXIST %2.FOR GOTO BIANYI2
IF NOT EXIST %2.FOR GOTO BIANYI2END
:FORSTOP3
H43
EDLIN %3.FOR
IF EXIST %3.FOR GOTO BIANYI3
IF NOT EXIST %3.FOR GOTO BIANYI3END
:FORSTOP1
H41
EDLIN %1.FOR
IF EXIST %1.FOR GOTO BIANYI1
ECHO DEBUG STOP.
